package cn.tedu;

public class Test5 {
    public static void main(String[] args) {
        My1Runnable t=new  My1Runnable();
        Thread x=new Thread(t);
        Thread x1=new Thread(t);
        Thread x2=new Thread(t);
        Thread x3=new Thread(t);
        x.start();
        x1.start();
        x2.start();
        x3.start();
    }
}
class My1Runnable implements Runnable{
    int a=100;
    @Override
    public void run(){
        while (true){
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if(a>0){
                System.out.println(Thread.currentThread().getName()+"        "+a);
            }else {
                break;
            }
            a--;
        }

    }
}